#include <stdio.h>
#include <stdlib.h>

int length(char* str){
	char c;
	int i = 0;
	c = str[i];
	while(c != '\0'){
		i++;
		c = str[i];
	}
	return (i-1);
}

int main (int argc, char **argv){
	char* cadena = "hola\0";
	int longitud = length(cadena);
	printf("longitud: %i \n", longitud);
}
